import request from '@/utils/request'

export function getList(data) {
    return request({
        url: '/sysUser/toList.do',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'      //改这里就好了
        },
        data,
    })
}

export function doEdit(data) {
    return request({
        url: '/sysUser/edit.do',
        method: 'post',
        // headers: {
        //     'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'      //改这里就好了
        // },
        data,
    })
}

export function doDelete(data) {
    return request({
        url: '/sysUser/deleteUser.do?id=' + data,
        method: 'post'
    })
}

export function getUserById(data) {
    return request({
        url: '/sysUser/getUserById.do?id=' + data,
        method: 'post'
    })
}


export function getCurrentLoginUserInfo() {
    return request({
        url: '/sysUser/getCurrentLoginUserInfo.do',
        method: 'post'
    })
}

export function resetPassword(data) {
    return request({
        url: '/sysUser/resetPass.do',
        method: 'post',
        data
    })
}
